<template>
    <div class="flex containter gap-16px">
        <div class="left flex-no-shrink">
            <insureList @insure-info="handleInsureInfo"/>
        </div>
        <div class="right flex-1">
            <list :code="code" :insureName="insureName"/>
        </div>
    </div>
</template>
<script setup>
import { ref } from 'vue'
import insureList from './components/insureCompany/insureList.vue'
import list from './components/insureCompany/list.vue'

const code = ref('')
const insureName = ref('')

const handleInsureInfo = (info) => {
    if(info) {
        code.value = info.code
        insureName.value = info.name
    }
}

</script>
<style lang="scss" scoped>
.containter {
    padding: 16px;
}
.left {
    width: 310px;
}
.right {
    width: calc(100vw - 570px);
}
</style>